import React from 'react';
import FormBlock from './FormBlock';

const Form6 = props => {
    const {
        form,
        initialFormInfo: { talentCode, recruitTalentTrains = [] }
    } = props;
    const { required, ...otherProps } = props; // required为true和false判断走2套校验规则
    const formInfoList = [
        {
            label: '起止时间',
            prop: 'dateRange',
            type: 'dateRange'
        },
        {
            label: '培训主题/内容',
            prop: 'trainContent'
        },
        {
            label: '培训机构',
            prop: 'trainOrganize'
        },
        {
            label: '证书',
            prop: 'certificate'
        }
    ];
    const blockProps = {
        ...otherProps,
        form,
        parentFieldData: recruitTalentTrains,
        parentField: 'recruitTalentTrains',
        formInfoList,
        titleText: '培训经历',
        addButtonText: '+添加培训经历',
        id: 'form6',
        talentCode
    };
    return <FormBlock {...blockProps} />;
};

export default Form6;
